<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="UTF-8">
		<title>XXX会员</title>
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<link rel="stylesheet" href="/static/css/style.css" />
		<script src="/static/js/jquery.min.js"></script>
		<script type="text/javascript" th:inline="javascript">

			$(function () {
				$(".download").click(function () {
					openApp();
				});
			});

			//提示
			var reminderWechatContent = '请点击微信右上角按钮，然后在弹出的菜单中，点击在浏览器中打开，即可安装';  //微信提示
			var reminderQQContent = '请点击QQ右上角按钮，然后在弹出的菜单中，点击在浏览器中打开，即可安装';        //QQ提示
			var reminderOtherContent = '请点击右上角按钮，然后在弹出的菜单中，点击在浏览器中打开，即可安装';        //其他提示
			var requestInput = "";
			var fname = "";

			var ios_link = "https://apps.apple.com/cn/app/%E5%A4%9A%E7%89%9B%E6%98%93%E6%B4%97/id1503309455";//ios下载地址
			var and_link = "http://a.app.qq.com/o/simple.jsp?pkgname=cn.mdchina.anhydrouscar";//Android移动端下载地址
			var u = navigator.userAgent.toLocaleLowerCase();
			//alert(u);
			//console.log(u);
			var isWeixin = u.match(/MicroMessenger/i) == 'micromessenger'; //判断是不是微信浏览器
			var isAndroid = u.indexOf('android') > -1||u.indexOf('qqbrowser') > -1; //android终端或者uc浏览器或者QQ浏览器
			var isiOS = !!u.match(/(iphone|ipod|ipad|mac)/i);

			function openApp() {
				//alert("调用下载失败"); //此处弹窗时，是没有version参数，如果在app中打开，是会有这个参数的
				if (isAndroid||isWeixin) {
					android1();
				}
				else {
					ios();
				}
			}

			//安卓事件处理
			function android1() {
				var userSystem = navigator.userAgent;
				var ua = userSystem.toLowerCase();
				if (ua.match(/MicroMessenger/i) == 'micromessenger'||ua.indexOf('statusbarheight') > -1) {
					$(".top").css("display", "block");
				}
				else {
					//window.location.href = 'xy://app/openwith?id=' + $("#hideGid").val();
					window.setTimeout(function () {
						//location.href = "Android下载地址";/***Android移动端下载地址***/
						location.href = and_link;
					}, 1500);
				}
			}

			//IOS事件处理
			function ios() {
				var userSystem = navigator.userAgent;
				var ua = userSystem.toLowerCase();
				if (ua.match(/MicroMessenger/i) == 'micromessenger'||ua.indexOf('qq/') > -1) {
					$(".top").css("display", "block");
				}
				else {
					//window.location.href = 'xiangYu://goods_detail?gid=' + $("#hideGid").val();
					window.setTimeout(function () {
						//location.href = "Android下载地址";/***Android移动端下载地址***/
						location.href = ios_link;
					}, 1500);
				}
			}

		</script>
	</head>

	<body>
	<div class="top">
		<div id="tip">
			<img src="/static/img/live_weixin.png" />
		</div>
	</div>
	<div class="download-top">
			<div class="logo">
				<img src="/static/img/logo.png" />
			</div>
			<span class="s1">XXX会员APP</span>
			<span class="s2">亿万用户的选择</span>
		</div>
		<div class="download-btns">
		<div class="btn">
			<a class="download">下载iPhone版</a>
		</div>
		<div class="btn">
			<a class="download">下载Android版</a>
		</div>
		</div>
	</body>

</html>